In the mathematical subfield of numerical analysis, monotone cubic interpolation is a variant of cubic interpolation that preserves monotonicity of the data set being interpolated.
Monotonicity is preserved by linear interpolation but not guaranteed by cubic interpolation.
Contents |
Monotone interpolation can be accomplished using cubic Hermite spline with the tangents modified to ensure the monotonicity of the resulting Hermite spline.
There are several ways of selecting interpolating tangents for each data point. This section will outline the use of the Fritsch–Carlson method.
Let the data points be for
for .
for ; these may be updated in further steps. For the endpoints, use one-sided differences:
must have a value greater than (or equal to, if monotonicity need not be strict) zero. One simple way to satisfy this constraint is to restrict the magnitude of vector to a circle of radius 3. That is, if , then set and where .
Note that only one pass of the algorithm is required.
After the preprocessing, evaluation of the interpolated spline is equivalent to cubic Hermite spline, using the data , , and for .
To evaluate at , find the smallest value larger than , , and the largest value smaller than , , among such that . Calculate
then the interpolant is
where are the basis functions for the cubic Hermite spline.